<template >
    <div>
        <van-nav-bar
        title="标题"
      
        left-arrow
        @click-left="onClickLeft"
        @click-right="onClickRight"
      />
        <img :src="gods.pic" alt="">
        <p>{{gods.title}}</p>
        <p class="price">￥{{gods.price}}</p>
    </div>
</template>
<script>
    import axios from 'axios'
export default {
    data(){
        return {
            gods:{},
        }
    },
    mounted(){
        let index = this.$route.query.id;
        console.log(index);
            axios.get('/list1.json').then(res=>{
                console.log(res);
                this.gods = res.data.result[index]
            })
    }
}
</script>
<style lang="scss">
        p{
            font-size: 18px;
        }
        .price{
            color: red;
        }
</style>